package Object;

public class equals {
    public static void main(String[] args) {
       // equals：比较两个对象是否相等
        Student s1=new Student("张三",12);
        Student s2=new Student("张三",12);
        /*boolean result = s1.equals(s2);
        System.out.println(result);//false*/
        boolean result = s1.equals(s2);
        System.out.println(result);


    }
}
